package lab03.test01;

import java.io.*;

public class Test {
    public static void main(String[] args) {

        String path="F:\\hello.txt";

        //字符流 写文件
        BufferedWriter writer=null;

        try {
            writer= new BufferedWriter(new FileWriter(path));

            writer.write("hello,world!");
            writer.newLine();//换行

            writer.write("1271373");
            writer.newLine();

            writer.write("bye!!!");

        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }




    }
}
